#if !defined ALI_MY_MATH_HEADER_FILE
#define ALI_MY_MATH_HEADER_FILE


#include <iostream.h>
#include <string.h>
#include <stdio.h>
//#include "rngs.h"


class CMy_Math_Base
{
	char *classIdentifier;
public:
	CMy_Math_Base::CMy_Math_Base();
	CMy_Math_Base(char *cn);
	virtual ~CMy_Math_Base();
	char * getClassIdentifier();
	void setClassIdentifier(char *ci);
	double getRandomDouble();
	static int myAtoi(char *n);
	static int myPow(int base, int exp);

	virtual void destroyInstance(); // delete current instance dynamic memory
};


class CMy_Matrix:public CMy_Math_Base
{
	int rowCount, colCount;	
public:
	double **mat;

	CMy_Matrix(char *ci);
	CMy_Matrix(int rc, int cc, char *ci);
	~CMy_Matrix();

	int getRowCount();
	int getColCount();

	void randomiseMatrix(); // create random values 
	void randomiseTriDiagonalMatrix(); // create a tridiagonal matrix

	int getDiagonals(CMy_Matrix* &mainDiag, CMy_Matrix* &lowerDiag, CMy_Matrix* &upperDiag);

	void printMatrix(); // print the matrix

	CMy_Matrix* multiply(CMy_Matrix* op2);
	double sumMatrixValues(); // sum all matrix values
	CMy_Matrix* addMatrices(CMy_Matrix* op2);
	CMy_Matrix* createIdentityMatrix(); // crates an identity matix corresponds to the current object

	CMy_Matrix* clone(); // copies the current instance
	
	void destroyInstance();// delete the current instance dynamic data
	
};

///////////
#endif // !defined ALI_MY_MATH_HEADER_FILE